import { BaseService, Service, Permission } from '@/cool';

@Service('crm/statistics')
export default class extends BaseService {
	// 订单统计
	@Permission('orderStatistics')
	async orderStatistics(params) {
		return this.request({
			url: '/orderStatistics',
			params: {
				...params
			}
		});
	}
	// 商品统计
	@Permission('goodsStatistics')
	async goodsStatistics(params) {
		return this.request({
			url: '/goodsStatistics',
			params: {
				...params
			}
		});
	}
	// 商品（销量，利润）排行
	@Permission('goodsRank')
	async goodsRank(params) {
		return this.request({
			url: '/goodsRank',
			params: {
				...params
			}
		});
	}
}
